{% extends extends_template %}
{% load url from future %}


{% block title %}
Login
{% endblock %}

{% block root_content %}


<div class="mainLocation description">
    <p>Description of bank
    {% if cli %}
     - CLI login</p>
    {% endif %}
</div>

<div class="mainLocation" id="loginlogout">

    {% if form.errors %}
    <div class="error">
        Your username and password didn't match. Please try again
    </div>
    {% endif %}
    
    {% if cli %}
    <form method="post" action="{% url 'type_app_login' login_type='cli' %}">
    {% else %}
    <form method="post" action="{% url 'app_login' %}">
    {% endif %}
    
        {% csrf_token %}
        {% if mobile %}
        <table>
            <tr>
                <td>{{ form.username.label_tag }}</td>
            </tr>
            <tr>
                <td>{{ form.username }}</td>
            </tr>
            <tr>
                <td>{{ form.password.label_tag }}</td>
            </tr>
            <tr>
                <td>{{ form.password }}</td>
            </tr>
            <tr>
                <td>
                    <input type="submit" class="submit" value="Login" />
                    <input type="hidden" name="next" value="{{ next }}" />
                </td>
            </tr>
            
        </table>
        {% else %}
        <table>
            <tr>
                <td>{{ form.username.label_tag }}</td>
                <td>{{ form.username }}</td>
            </tr>
            <tr>
                <td>{{ form.password.label_tag }}</td>
                <td>{{ form.password }}</td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" class="submit" value="Login" />
                    <input type="hidden" name="next" value="{{ next }}" />
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    {% if cli %}
                    <div><a href="{% url 'app_login' %}">Login in web-mode</a></div>
                    {% else %}
                    <div><a href="{% url 'type_app_login' login_type='cli' %}">Login in cli-mode</a></div>
                    {% endif %}
                </td>
            </tr>
            
        </table>
        {% endif %}
    </form>

</div>
{% endblock %}
